package edu.sctu.zhoumengxue.day201506.day20150615.bufferReader;


import java.io.*;

/**
 * Created by user12 on 2015/6/15.
 */
public class Main {


    public static void main(String[] args) {
        ReaderPractice practice = new ReaderPractice();

        practice.readFile();
        practice.isReader();

        try {
            FileReader reader = new FileReader("D://zhou.txt");

            try {
                FileWriter writer = new FileWriter("D://meng.txt");
                BufferedReader bufferedReader = new BufferedReader(reader);
                BufferedWriter bufferedWriter = new BufferedWriter(writer);

                String line = null ;
                while ((line=bufferedReader.readLine())!=null){
                    bufferedWriter.write(line);
                    bufferedWriter.newLine();
                    bufferedWriter.flush();
                }
                bufferedReader.close();
                bufferedWriter.close();
            } catch (IOException e) {
                e.printStackTrace();
            }



        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

    }
}
